package field_method07;

public class MyStringTest {
    public static void main(String[] args) {
        String s1 = "hello java";
        String s2 = "hello java";

        if (s1.equals(s2)){

            if (s1 .equals(s2)){
                String newStr = s1.replaceAll("\\s+","")
                        .replace("java","world");
                System.out.println(newStr);
            }else {
                System.out.println("两个字符串不相等");
            }
        }

    }

}
